<!doctype html>
{php}
    $static = '/static/home/';
{/php}
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>{$siteConfig['seo_title']}</title>
    <meta name="apple-mobile-web-app-title" content="{$siteConfig['seo_title']}">
    <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,width=device-width">
    <link rel="shortcut icon" href="{$static}images/favicon.ico">
    <link href="{$static}css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="{$static}css/icons.min.css" rel="stylesheet" type="text/css" />
    <link href="{$static}css/app.min.css" rel="stylesheet" type="text/css" />
    <link href="{$static}css/style.css" rel="stylesheet" type="text/css" />
</head>
<body data-sidebar="dark">
<style type="text/css">
    table tr td {
        vertical-align:middle !important;
    }
</style>
<div id="layout-wrapper">
    {include file='public/mine_topbar' /}
    {include file='public/mine_left' /}
    <div class="main-content">
        <div class="page-content">
            <div class="container-fluid">
                <!-- start page title -->
                <div class="row">
                    <div class="col-12">
                        <div class="page-title-box d-flex align-items-center justify-content-between">
                            <h4 class="mb-0 font-size-18"><i class="mdi mdi-file-multiple-outline"></i> 项目分组</h4>
                            <div class="page-title-right">
                                <ol class="breadcrumb m-0">
                                    <li class="breadcrumb-item"><a href="javascript:void(0)">鹰眼短链</a></li>
                                    <li class="breadcrumb-item active">分组管理</li>
                                </ol>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- end page title -->

                <div class="row justify-content-center">
                    <div class="col-12">
                        <div class="card">
                            <div class="card-body">
                                <div class="row">
                                    <div class="col-xl-6 col-md-6">
                                        <p>您可以自己创建属于自己的项目分组，将短链进行归类</p>
                                        <p>例如：我的推广分组</p>
                                    </div>
                                    <div class="col-xl-2 col-md-6">
                                        <a class="btn btn-success btn-block" href="{:url('urlGroup/add')}">添 加</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-12">
                        <div class="card">
                            <div class="card-body">
                                <div class="header-title">分组列表</div>
                                <div class="table-responsive pb-5">
                                    <table id="datatable" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                                        <thead>
                                            <tr>
                                                <th>分组ID</th>
                                                <th>分组名称</th>
                                                <th>分组状态</th>
                                                <th>关联链接数</th>
                                                <th>分组描述</th>
                                                <th>修改时间</th>
                                                <th>创建时间</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        {empty name="list"}
                                        <tr>
                                            <td>----</td>
                                            <td>----</td>
                                            <td>----</td>
                                            <td>----</td>
                                            <td>----</td>
                                            <td>----</td>
                                            <td>----</td>
                                        </tr>
                                        {else /}
                                            {foreach name="list" item="vo"}
                                            <tr>
                                                <td>{$vo.groupId}</td>
                                                <td>{$vo.groupName}</td>
                                                <td>
                                                    {switch $vo.status }
                                                        {case 0}<span class="color-red">禁用</span>{/case}
                                                        {case 1}<span class="color-green">启用</span>{/case}
                                                    {/switch}
                                                </td>
                                                <td>{$vo.count}</td>
                                                <td>{$vo.description}</td>
                                                <td>{$vo.modifyTime}</td>
                                                <td>{$vo.createTime}</td>
                                                <td>
                                                    <a href="{:url('urlGroup/edit', array('id' => $vo.groupId))}" class="btn btn-primary">
                                                        <i class="mdi mdi-file-document-edit-outline"></i>
                                                        <span class="title ">编辑</span>
                                                    </a>
                                                    <a href="{:url('urlGroupRelation/index', array('id' => $vo.groupId))}"  class="btn btn-primary">
                                                        <i class="mdi mdi-file-document-edit-outline"></i>
                                                        <span class="title ">管理短链</span>
                                                    </a>
                                                </td>
                                            </tr>
                                            {/foreach}
                                        {/empty}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div> <!-- end col -->
                </div> <!-- end row -->

            </div> <!-- container-fluid -->
        </div>
        <!-- End Page-content -->
    </div>
    <!-- end main content-->

</div>
<!-- END layout-wrapper -->


<!-- JAVASCRIPT -->
<script src="{$static}libs/jquery/jquery.min.js"></script>
<script src="{$static}libs/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="{$static}libs/metismenu/metisMenu.min.js"></script>
<script src="{$static}libs/simplebar/simplebar.min.js"></script>
<script src="{$static}libs/node-waves/waves.min.js"></script>

<script src="{$static}js/app.js"></script>
</body>
</html>
